<?php
/*
 * $Id: MailSendException.class.php 218 2009-10-27 02:42:02Z takuji.mezawa $
 * 
 * (C) 2009, Mezawa Takuji, EzoGP (http://ezogp.sourceforge.jp/).
 * 
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/**
 * メール送信例外クラス。
 * 
 * @author     $Author: takuji.mezawa $  (EzoGP)
 * @version    $Revision: 218 $, SyracavaPHP 0.1
 * @package    service
 * @subpackage *
 */
class MailSendException extends Exception {
    private static $typename = __CLASS__;   // 自身のクラス名
    
    /**
     * コンストラクタ。
     * 
     * @param string $message　例外メッセージ
     * @param int $code　エラーコード
     */
    public function __construct($message, $code=0) {
        parent::__construct($message, $code);
    }
    
    /**
     * 本クラスの文字列化
     */
    public function _toString() {
        return sprintf("%s: [%d]: %s\n", self::$typename, $this->code, $this->message);
    }
}
?>